From: Eli Zaretskii Date: Sat, 4 Feb 2012 09:27:03 +0000 (+0200) Subject: Fix bug #10696 with crash when an empty display string is at BOB. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~957 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=3c34e56d0ef0e808d9ed0b38e3b91cc3d264cc39;p=emacs.git Fix bug #10696 with crash when an empty display string is at BOB. src/keyboard.c (adjust_point_for_property): Don't position point before BEGV. --- diff --git a/src/ChangeLog b/src/ChangeLog index 6d91c672f8c..d3fb97a01c1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-02-04 Eli Zaretskii + + * keyboard.c (adjust_point_for_property): Don't position point + before BEGV. (Bug#10696) + 2012-02-03 Paul Eggert Handle overflow when computing char display width (Bug#9496). diff --git a/src/keyboard.c b/src/keyboard.c index c92f8f3f806..d4ff3c58f9b 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1749,7 +1749,9 @@ adjust_point_for_property (EMACS_INT last_pt, int modified) { xassert (end > PT); SET_PT (PT < last_pt - ? (STRINGP (val) && SCHARS (val) == 0 ? beg - 1 : beg) + ? (STRINGP (val) && SCHARS (val) == 0 + ? max (beg - 1, BEGV) + : beg) : end); check_composition = check_invisible = 1; }